package com.jiaofu.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jiaofu.pojo.Person;
import com.jiaofu.vo.PersonVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
@Mapper
public interface PersonMapper extends BaseMapper<Person> {
    @Select("select p.*,c.content " +
            "from tb_persons p " +
            "LEFT JOIN tb_per_content c " +
            "on c.infoid = p.infoid " +
            "where p.id = #{id}")
    List<PersonVo> selectPerson(int id);
}
